package com.bingbing.back.controller;

import com.bingbing.back.common.bean.AjaxResult;
import com.bingbing.back.mapper.RobotMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class RobotController {
    @Autowired(required=false)
    private RobotMapper robotMapper;
    @GetMapping("/keyword")
    public AjaxResult<?> keyword1(@RequestParam String keyword){
        String s = robotMapper.selectIdByKey(keyword);
        System.out.println(s);
        return  AjaxResult.success(s);
    }

}
